package com.ltg.gateway.fiter;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * <p> ClassName: GlobaLogFiter </p>
 * <p> Package: com.ltg.gateway.fiter </p>
 * <p> Description: </p>
 * <p></p>
 *
 * @Author: LTG
 * @Create: 2024/2/25 - 20:46
 * @Version: v1.0
 */
@Component
@Slf4j
public class GlobalLogFilter implements GlobalFilter, Ordered {
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.info("==================sadhsakdh");
        return chain.filter(exchange);
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
